package com.sea.design.service.impl;


import com.codecrane.core.util.DateUtils;
import com.sea.design.entity.Design;
import com.sea.design.mapper.DesignMapper;
import com.sea.design.service.DesignService;
import com.sea.finance.entity.Inventory;
import com.sea.finance.mapper.InventoryMapper;
import com.sea.finance.service.InventoryService;
import com.sea.operate.entity.RelatedSku;
import com.sea.operate.service.RelatedSkuService;
import com.sea.physical.entity.CreateDespatchSku;
import com.sea.physical.service.CreateDespatchSkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.ParseException;
import java.util.List;


/**
 * @author 陈鸿飞
 */
@Service
public class DesignServiceImpl implements DesignService {

    @Autowired
    private DesignMapper designMapper;

    @Override
    public List<Design> findByCnd(Design design) {
        return designMapper.findByCnd(design);
    }

    @Override
    public Integer save(Design design) {
        design.setDesignStatus(1);
        return designMapper.insert(design);
    }

    @Override
    public Design findById(Integer id) {
        return designMapper.findById(id);
    }

    @Override
    public Integer usave(Design design) {
        return designMapper.update(design);
    }

    @Override
    public Integer delete(Integer id) {
        return designMapper.delete(id);
    }
}
